package factory;
/**
 * 简单工厂模式
 */
public class EasyFactory {

    public static void main(String[] args) {
        EasyFactory easyFactory = new EasyFactory();
        easyFactory.BuildCategory(1);
        easyFactory.BuildCategory(2);
    }

    public void BuildCategory(int category) {
        switch (category) {
            case 1:
                System.out.println("建立类别：首页");
            case 2:
                System.out.println("建立类别：博客");
            case 3:
                System.out.println("建立类别：学习");
            case 4:
                System.out.println("建立类别：下载");
            case 5:
                System.out.println("建立类别：社区");
        }
    }
}
